// 创建分组实例
CheckboxGroup fruitGroup = new CheckboxGroup();
CheckboxGroup carGroup = new CheckboxGroup();

// 添加到不同的组中，并指定初始状态
Checkbox apple = new Checkbox("Apple", fruitGroup, false);
Checkbox banana = new Checkbox("Banana", fruitGroup, true); // 默认选中香蕉
Checkbox orange = new Checkbox("Orange", fruitGroup, false);

Checkbox bmw = new Checkbox("BMW", carGroup, false);
Checkbox audi = new Checkbox("Audi", carGroup, false);